void kbd_iproc(int signum)
{	
	 printf("\n signal from kbd is received\n");
	 
	 // copy input buffer
     if (in_mem_p->indata[0] != '\0')
	 {                      
         MsgEnv * msgenv=receive_message();
         int senderpid=msgenv->sender_pid;
         PCB * sender=get_PCB(senderpid)
         //newMsgEnv->msg_data=
	     strcpy(msgenv->msg_data,in_mem_p->indata); 
	     strcat(msgenv->msg_data,"\n");
         //rtx->send_message(sender,msgenv);
         msgenv_type=console_input;
         // printf("keb input is %s \n:", newMsgEnv->msg_data);
	     // we should parse the input string and execute the command given,
	     //  but for now we just echo the input
	     // 
	     //  strcpy(command.indata,in_mem_p->indata);
	     // printf("Keyboard input was: %s\n",command.indata);
	     //in_mem_p->ok_flag = 0;  // tell child that the buffer has been emptied
	     //kill(out_pid,SIGUSR2);
	     in_mem_p->ok_flag = 0;  // tell child that the buffer has been emptied
         sender->MsgEnvQ->enqueue(msgenv);
	     return;
    }
    else 
    in_mem_p->ok_flag = 0;
}

void crt_iproc(int signum)
{	
    MsgEnv * msgenv=receive_message();	
    int senderpid=msgenv->sender_pid;
    PCB * sender=get_PCB(senderpid)
	// copy input buffer
//	if (msgenv->msg_data[0] != '\0')
//	{
	    strcpy(out_mem_p->indata,msgenv->msg_data); 
    msgenv_type=display_ack;
    sender->MsgEnvQ->enqueue(msgenv);
	    // we should parse the input string and execute the command given,
	    //  but for now we just echo the input
	    // 
	    //printf("%s\n",out_mem_p->indata);
	    out_mem_p->ok_flag = 1;  // tell child that the buffer has been emptied
	    return;
//	}
 //   else
 //   printf("only enter is entered???\n");
 //   in_mem_p->ok_flag = 0;
}
